<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>
	<xsl:template name="get-control-point">
		<xsl:choose>
			<xsl:when test="type='label'">12, <xsl:value-of select="(line_index*26)+2"/></xsl:when>
			<xsl:when test="type='check'">12, <xsl:value-of select="(line_index*26)-1"/></xsl:when>
			<xsl:otherwise>120, <xsl:value-of select="(line_index*26)-1"/></xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="get-control-type">
		<xsl:choose>
			<xsl:when test="type='label'">DevExpress.XtraEditors.LabelControl</xsl:when>
			<xsl:when test="type='text'">DevExpress.XtraEditors.TextEdit</xsl:when>
			<xsl:when test="type='date'">DevExpress.XtraEditors.DateEdit</xsl:when>
			<xsl:when test="type='check'">DevExpress.XtraEditors.CheckEdit</xsl:when>
			<xsl:when test="type='combo'">DevExpress.XtraEditors.ComboBoxEdit</xsl:when>
			<xsl:when test="type='lookup'">DevExpress.XtraEditors.ButtonEdit</xsl:when>
			<xsl:when test="type='combolookup'">DevExpress.XtraEditors.ComboBoxEdit</xsl:when>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="get-control-name">
		<xsl:choose>
			<xsl:when test="type='label'">lbl</xsl:when>
			<xsl:when test="type='text'">txt</xsl:when>
			<xsl:when test="type='date'">dte</xsl:when>
			<xsl:when test="type='check'">chk</xsl:when>
			<xsl:when test="type='combo'">cbe</xsl:when>
			<xsl:when test="type='lookup'">bte</xsl:when>
			<xsl:when test="type='combolookup'">cbe</xsl:when>
		</xsl:choose>
		<xsl:value-of select="name"/>
	</xsl:template>
<xsl:template match="/root">namespace <xsl:value-of select="name"/>.Forms.Lookup
{
    partial class <xsl:value-of select="search_class_name"/><![CDATA[Form
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>]]>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.gridControl = new CSW.Framework.UI.DevEx.UserControls.BaseGridControl();
            this.gridView = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.groupControl1 = new DevExpress.XtraEditors.GroupControl();
            this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
            this.groupControl2 = new DevExpress.XtraEditors.GroupControl();
            <xsl:for-each select="control">this.<xsl:call-template name="get-control-name"/> = new <xsl:call-template name="get-control-type"/>();
            </xsl:for-each>this.btnClear = new DevExpress.XtraEditors.SimpleButton();
            this.btnSearch = new DevExpress.XtraEditors.SimpleButton();
            ((System.ComponentModel.ISupportInitialize)(this.gridControl)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.groupControl1)).BeginInit();
            this.groupControl1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.groupControl2)).BeginInit();
            this.groupControl2.SuspendLayout();
            <xsl:for-each select="control[type!='label']">((System.ComponentModel.ISupportInitialize)(this.<xsl:call-template name="get-control-name"/>.Properties)).BeginInit();
            </xsl:for-each>this.SuspendLayout();
            // 
            // gridControl
            // 
            this.gridControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.gridControl.EmbeddedNavigator.Name = "";
            this.gridControl.ExportFileName = null;
            this.gridControl.Location = new System.Drawing.Point(5, 23);
            this.gridControl.MainView = this.gridView;
            this.gridControl.Name = "gridControl";
            this.gridControl.Size = new System.Drawing.Size(782, <xsl:value-of select="402 - (edit_control_count*26)"/>);
            this.gridControl.TabIndex = 20;
            this.gridControl.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
            this.gridView});
            this.gridControl.RowDoubleClick += new CSW.Framework.UI.DevEx.UserControls.RowDoubleClickEventHandler(this.gridControl_RowDoubleClick);
            // 
            // gridView
            // 
            this.gridView.GridControl = this.gridControl;
            this.gridView.Name = "gridView";
            // 
            // groupControl1
            // 
            this.groupControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.groupControl1.Controls.Add(this.gridControl);
            this.groupControl1.Location = new System.Drawing.Point(12, <xsl:value-of select="76 + (edit_control_count*26)"/>);
            this.groupControl1.Name = "groupControl1";
            this.groupControl1.Size = new System.Drawing.Size(792, <xsl:value-of select="430 - (edit_control_count*26)"/>);
            this.groupControl1.TabIndex = 1;
            this.groupControl1.Text = "Search Results";
            // 
            // dxErrorProvider
            // 
            this.dxErrorProvider.ContainerControl = this;
            // 
            // groupControl2
            // 
            this.groupControl2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            <xsl:for-each select="control">this.groupControl2.Controls.Add(this.<xsl:call-template name="get-control-name"/>);
            </xsl:for-each>this.groupControl2.Controls.Add(this.btnClear);
            this.groupControl2.Controls.Add(this.btnSearch);
            this.groupControl2.Location = new System.Drawing.Point(12, 12);
            this.groupControl2.Name = "groupControl2";
            this.groupControl2.Size = new System.Drawing.Size(792, <xsl:value-of select="edit_control_count*26 + 58"/>);
            this.groupControl2.TabIndex = 0;
            this.groupControl2.Text = "Search";
            <xsl:for-each select="control">
            // 
            // <xsl:call-template name="get-control-name"/>
            // 
            this.<xsl:call-template name="get-control-name"/>.Location = new System.Drawing.Point(<xsl:call-template name="get-control-point"/>);
            this.<xsl:call-template name="get-control-name"/>.Name = "<xsl:call-template name="get-control-name"/>";
            this.<xsl:call-template name="get-control-name"/>.Size = new System.Drawing.Size(<xsl:choose><xsl:when test="type='label'">75, 13</xsl:when><xsl:otherwise>159, 20</xsl:otherwise></xsl:choose>);
            this.<xsl:call-template name="get-control-name"/>.TabIndex = <xsl:value-of select="tabindex*5"/>;
			<xsl:choose>
			<xsl:when test="type='label'">
			this.<xsl:call-template name="get-control-name"/>.Text = "<xsl:value-of select="label"/>";
			</xsl:when>
			<xsl:when test="type='check'">
			this.<xsl:call-template name="get-control-name"/>.Properties.AutoWidth = true;
			this.<xsl:call-template name="get-control-name"/>.Properties.Caption = "<xsl:value-of select="label"/>";
			</xsl:when>
			<xsl:when test="type='date'">
			this.<xsl:call-template name="get-control-name"/>.EditValue = null;
			this.<xsl:call-template name="get-control-name"/>.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
				new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
			this.<xsl:call-template name="get-control-name"/>.Properties.VistaTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
				new DevExpress.XtraEditors.Controls.EditorButton()});
			</xsl:when>
			<xsl:when test="type='combo'">
			this.<xsl:call-template name="get-control-name"/>.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
				new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
			this.<xsl:call-template name="get-control-name"/>.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
			</xsl:when>				
			<xsl:when test="type='lookup'">
			this.<xsl:call-template name="get-control-name"/>.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
				new DevExpress.XtraEditors.Controls.EditorButton()});
			this.<xsl:call-template name="get-control-name"/>.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
			</xsl:when>
			</xsl:choose>
            </xsl:for-each>
            // 
            // btnClear
            // 
            this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.btnClear.Location = new System.Drawing.Point(86, <xsl:value-of select="edit_control_count*26 + 27"/>);
            this.btnClear.Name = "btnClear";
            this.btnClear.Size = new System.Drawing.Size(75, 23);
            this.btnClear.TabIndex = 51;
            this.btnClear.Text = "&amp;Clear";
            this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
            // 
            // btnSearch
            // 
            this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.btnSearch.Location = new System.Drawing.Point(5, <xsl:value-of select="edit_control_count*26 + 27"/>);
            this.btnSearch.Name = "btnSearch";
            this.btnSearch.Size = new System.Drawing.Size(75, 23);
            this.btnSearch.TabIndex = 50;
            this.btnSearch.Text = "&amp;Search";
            this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
            // 
            // <xsl:value-of select="search_class_name"/>Form
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(816, 518);
            this.Controls.Add(this.groupControl2);
            this.Controls.Add(this.groupControl1);
            this.Name = "<xsl:value-of select="search_class_name"/>Form";
            this.Text = "<xsl:value-of select="search_class_name"/>";
            this.WindowState = System.Windows.Forms.FormWindowState.Normal;
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            ((System.ComponentModel.ISupportInitialize)(this.gridControl)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.groupControl1)).EndInit();
            this.groupControl1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.groupControl2)).EndInit();
            this.groupControl2.ResumeLayout(false);
            this.groupControl2.PerformLayout();
            <xsl:for-each select="control[type!='label']">((System.ComponentModel.ISupportInitialize)(this.<xsl:call-template name="get-control-name"/>.Properties)).EndInit();
            </xsl:for-each>
            this.ResumeLayout(false);
        }

        #endregion

        private CSW.Framework.UI.DevEx.UserControls.BaseGridControl gridControl;
        private DevExpress.XtraGrid.Views.Grid.GridView gridView;
        private DevExpress.XtraEditors.GroupControl groupControl1;
        private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider;
        private DevExpress.XtraEditors.GroupControl groupControl2;
        <xsl:for-each select="control">private <xsl:call-template name="get-control-type"/><xsl:text> </xsl:text><xsl:call-template name="get-control-name"/>;
        </xsl:for-each>private DevExpress.XtraEditors.SimpleButton btnClear;
        private DevExpress.XtraEditors.SimpleButton btnSearch;
    }
}
</xsl:template>
</xsl:stylesheet>